<template>
    <div>
      <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>赛事管理</el-breadcrumb-item>
      <el-breadcrumb-item>成绩管理</el-breadcrumb-item>
    </el-breadcrumb>
      <el-table
    :data="tableData"
    style="width: 100%"
    :row-class-name="tableRowClassName">
    <el-table-column
      prop="date"
      label="日期"
      width="180">
    </el-table-column>
    <el-table-column
      prop="name"
      label="比赛名称"
      width="180">
    </el-table-column>
    <el-table-column
      prop="address"
      label="地址">
    </el-table-column>
    <el-table-column label="操作">
        <template >
           <el-button  @click="QrscoreDialogVisible=true">扫码打分</el-button>
             
            
             
            <el-button @click="doscoreDialogVisible=true">批量打分</el-button>
             <el-button @click="scoreDialogVisible=true">成绩查看</el-button>
               </template>

    </el-table-column>
  </el-table>
<el-dialog title="扫码打分" :visible.sync="QrscoreDialogVisible" width="50%">
    
   <el-input   placeholder="请使用设备扫二维码"></el-input>
    
</el-dialog>
<el-dialog title="批量打分" :visible.sync="doscoreDialogVisible" width="50%">
    <el-form ref="form"  label-width="80px">
      <el-form-item label="选择项目">
    <el-select  placeholder="选择项目">
      <el-option label="“红雀”橡筋动力飞机竞时赛" value="shanghai"></el-option>
      <el-option label="“空中战士Ⅱ”线操纵飞机积分赛" value="beijing"></el-option>
       <el-option label="遥控手掷滑翔机（F3K）" value="beijing"></el-option>
        <el-option label="“美利达”遥控飞机追逐赛" value="beijing"></el-option>
    </el-select>
  </el-form-item>
 <el-table
    :data="scoreData"
    style="width: 100%"
  >
 <el-table-column
      prop="date"
      label="名字"
      width="180">
    </el-table-column>
<el-table-column
      prop="date"
      label="会员号"
      width="180">
    </el-table-column>
    <el-table-column
      
      label="第一轮"
      width="180">
<el-form-item label="第一轮分">
    <el-input  placeholder="单位：（米）"></el-input>
  </el-form-item>
    </el-table-column>
    <el-table-column
      
      label="第二轮"
      width="180">
<el-form-item label="第二轮分">
    <el-input  placeholder="单位：（米）"></el-input>
  </el-form-item>
    </el-table-column>
<el-table-column
      
      label="打分人"
      width="180">
<el-form-item label="打分人">
    <el-input  placeholder="单位：（米）"></el-input>
  </el-form-item>
    </el-table-column>
 </el-table>


    <el-form-item>
    <el-button type="primary" @click="onSubmit">确定</el-button>
    <el-button>取消</el-button>
  </el-form-item>
            </el-form>
  
    
</el-dialog>
  <el-dialog title="成绩查看" :visible.sync="scoreDialogVisible" width="50%">
    <el-table
    :data="scoreData"
    style="width: 100%"
  >
  <el-table-column
      prop="date"
      label="名字"
      width="180">
    </el-table-column>
    <el-table-column
      prop="name"
      label="项目"
      width="180">
    </el-table-column>
    <el-table-column
      prop="name"
      label="第一轮"
      width="180">
    </el-table-column>
    <el-table-column
      prop="address"
      label="第二轮">
    </el-table-column>
    <el-table-column
      prop="address"
      label="排名">
    </el-table-column>
    </el-table>
  
  
  </el-dialog>
    </div>
</template>
<script>
  export default {
    methods: {
      tableRowClassName({row, rowIndex}) {
        if (rowIndex === 1) {
          return 'warning-row';
        } else if (rowIndex === 2) {
          return 'success-row';
        }
        return '';
      }
    },
    data() {
      return {
        tableData: [{
          date: '2016-05-02',
          name: '飞向北京职业挑战赛',
          address: '郑州市上街区航校',
        },  {
          date: '2016-05-03',
          name: '全国锦标赛',
          address: '郑州市上街区航校'
        }],
        scoreData:[],
        scoreDialogVisible:false,
        QrscoreDialogVisible:false,
        doscoreDialogVisible:false
      }
    },
    methods:{
printScoreByQR(){
    this.$router.push('/printScorebyQR')
},
printScoreByCom(){
    this.$router.push('/printScoreByCom')
}
    }
  }
</script>
<style lang="less" scoped>
.el-table .warning-row {
    background: oldlace;
  }

  .el-table .success-row {
    background: #f0f9eb;
  }
</style>